Skip to content

Fix plugin Filter exclusion accounting - #351

Merged
joesobo merged 5 commits into
mainfrom
codex/fix-plugin-filter-accounting-242
Aug 7, 2026
Merged

Fix plugin Filter exclusion accounting#351
joesobo merged 5 commits into
mainfrom
codex/fix-plugin-filter-accounting-242

Conversation

@joesobo

@joesobo joesobo commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Problem

Active plugin default Filters can remove workspace files before analysis, but the Filters control only counted Nodes removed later in the Graph View. The control could therefore report zero while plugin Filters visibly reduced graph membership.

Fix

  • Core records one required discovery accounting value: Filter-excluded workspace files and Git-ignored paths are separate fields in the same snapshot.
  • Workspace metadata version 2 persists that snapshot. Cached replay reads the persisted value instead of trying to infer exclusions from analyzed cache files. Metadata without current accounting requires a re-index and never reports a fabricated zero.
  • The existing graph-controls snapshot carries accounting through full analysis, scoped refresh, plugin broadcast, and webview bootstrap. The separate Filter-accounting message and optional getter fallback were removed.
  • The Filters panel reports two explicit metrics with different units: workspace files excluded before analysis and Nodes excluded in the Graph View. It does not add, maximize, or reconcile them, so overlap cannot create a false total.
  • Plugin-owned defaults and .gitignore stay conceptually separate. This change does not alter any plugin default Filter.

Verification

  • 51 focused Core tests: discovery accounting, Git-ignore separation, analysis wiring, metadata persistence, invalid metadata, and concurrent metadata updates.
  • 70 focused extension Node tests: mixed TypeScript/Godot/Unity defaults, restart/cache replay, re-index persistence, scoped refresh modes, graph-controls delivery, and bootstrap settings paths.
  • 25 focused webview tests: rendered accounting, unavailable accounting, simultaneous discovery-time and Graph View exclusions, and overlap without reconciliation.
  • pnpm --filter @codegraphy-dev/extension typecheck
  • Focused ESLint on all changed TypeScript and TSX files.
  • Extension Development Host Playwright scenario that indexes a real workspace, enables the TypeScript plugin, re-indexes, and verifies the rendered graph/count change.

Visual proof

Before plugin activation: 19 Nodes, no active Filters, and 0 workspace files excluded before analysis.

Before plugin activation

After enabling the TypeScript plugin defaults and re-indexing: 18 Nodes and 1 workspace file excluded before analysis. Graph View exclusions remain a separate 0-Node metric.

After plugin activation

Trello

Trello #242

@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
codegraphy Skipped Skipped Aug 7, 2026 3:00pm

@changeset-bot

changeset-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 59f26e6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@codegraphy-dev/core Patch
@codegraphy-dev/extension Patch
@codegraphy-dev/tldraw Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@joesobo
joesobo marked this pull request as ready for review August 6, 2026 18:01
@joesobo
joesobo marked this pull request as draft August 7, 2026 14:53
@joesobo
joesobo marked this pull request as ready for review August 7, 2026 15:51
@joesobo
joesobo merged commit b520cbb into main Aug 7, 2026
38 checks passed
@joesobo
joesobo deleted the codex/fix-plugin-filter-accounting-242 branch August 7, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant